/* /发送消息 */
.text-to{
  display: flex;
  justify-content: flex-end;
  width: 100%;
  margin-bottom: 15px;
  .time{
    text-align: right;
  }
}
/* 接收消息 */
.get-to{
  display: flex;
  width: 100%;
  margin-bottom: 15px;

}
.content-get{
  margin-left: 5px;
}
.content-send{
  margin-right: 5px;
}
/* 气泡框 */
.send-text {
  background: #95ec69;
  position: relative;
  padding: 10px;
  max-width: 70vw;
  border-radius: 15px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  /* max-width: 100%; */
}
.send-text::before {
  content: '';
  position: absolute;
  right: -6px;
  top: 10;
  width: 10px;
  height: 10px;
  background: #95ec69;
  clip-path: polygon(0 0, 0 100%, 100% 0);
}
.get-text{
  position: relative;
  padding: 10px;
  border-radius: 15px;
  max-width: 80vw;
  background-color: #fff;
  box-shadow: 0 1px 10px rgba(0,0,0,0.1);
}
.get-text::before{
  content: '';
  position: absolute;
  left: -10px;
  top: 10;
  width: 10px;
  height: 10px;
  background: #fff;
  clip-path: polygon(0 0, 100% 0, 100% 100% ); 
  /* polygon() 是 clip-path 的一个函数，用于定义多边形的顶点。它的语法如下：clip-path: polygon(x1 y1, x2 y2, x3 y3, ...);每个 x y 表示多边形的一个顶点坐标。坐标是相对于元素的左上角（0 0）定义的。最后一个顶点会自动连接到第一个顶点，形成闭合的多边形 */
}
.send-image {
  max-height: 160px;
  max-width: 160px;
  border-radius: 8px;
  overflow: hidden;
  /* border: 1px solid var(--cp-line); */
}
/*  用户头像、客服邮箱 */
.head-img{
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  /* margin-right: 13px; */
}

.message-wrapper {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}
.message-content {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 68vw;
}
.message-left .message-content {
  margin-right: auto;
}
.message-right .message-content {
  flex-direction: row-reverse;
  margin-left: auto;
}
/* 头像 */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.avatar img message-left{
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* .message-bubble {
  position: relative;
  padding: 12px 16px;
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  max-width: 100%;
} */

/* .message-left .message-bubble {
  background: #fff;
  border-bottom-left-radius: 4px;
}

.message-right .message-bubble {
  background: #95ec69;
  border-bottom-right-radius: 4px;
}

.message-left .message-bubble::before {
  content: '';
  position: absolute;
  left: -8px;
  bottom: 0;
  width: 16px;
  height: 16px;
  background: #fff;
  clip-path: polygon(100% 0, 0 100%, 100% 100%);
} */

/* .message-right .message-bubble::before {
  content: '';
  position: absolute;
  right: -8px;
  bottom: 0;
  width: 16px;
  height: 16px;
  background: #95ec69;
  clip-path: polygon(0 0, 0 100%, 100% 100%);
  
} */
/* 文字消息 */
.text-message {
  font-size: 16px;
  line-height: 1.4;
  word-break: break-word;
}
/* 图片消息 */
.image-message img {
  max-width: 100%;
  border-radius: 12px;
  cursor: pointer;
}
.file-message {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.file-icon {
  font-size: 24px;
  color: #1976d2;
}

.file-name {
  color: #1976d2;
  text-decoration: underline;
}
/* .message-time {
  font-size: 12px;
  color: #8e8e8e;
  margin-top: 4px;
  padding: 0 48px;
  text-align: center;
} */